package com.loop.stuSystem;

import java.util.Date;
import java.util.Objects;

/**
 * 学生类
 */
public class Student {
    //学号
    private String sId;
    //名字
    private String name;
    //年龄
    private Integer age;
    //生日
    private String birthday;

    public Student() {
    }

    public Student(String sId, String name, Integer age, String birthday) {
        this.sId = sId;
        this.name = name;
        this.age = age;
        this.birthday = birthday;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(sId, student.sId) &&
                Objects.equals(name, student.name) &&
                Objects.equals(age, student.age) &&
                Objects.equals(birthday, student.birthday);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sId, name, age, birthday);
    }

    @Override
    public String toString() {
        return "学生姓名："+ name+",学号："+ sId+ ",年龄："+age+"岁 ,生日："+birthday;
    }

    public String getsId() {
        return sId;
    }

    public void setsId(String sId) {
        this.sId = sId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
}
